import request from '@/utils/request'

export default {
  initShopgoodsList(params){
    /** 获取商品详情 **/
    let data = {
      goodsId:params.goodsId,
      catId:params.catId
    }
    return request({
      url: '/shopGoods/goodsInfoByIdPro',
      method: 'post',
      data
    })
  },
  addShoppingCartInfo(params){
    /** 商品加入购物车 **/
    let data = params;
    return request({
      url: '/shopCart/insert',
      method: 'post',
      data
    })
  },
  getCommentInfo(params, page, size){
    /** 商品详情页获取评论信息 **/
    let data = params;
    return request({
      url: '/shopGoodsComment/getInfos?page='+page+'&size='+size,
      method: 'post',
      data
    })
  },
  updateCommentLikeNum(params){
    let data = params;
    return request({
      url: '/shopGoodsComment/data/updateById',
      method: 'post',
      data
    })
  }
}
